//
//  ImageButton.m
//  XYMaterial
//
//  Created by 肖扬 on 15/12/10.
//  Copyright © 2015年 肖扬. All rights reserved.
//

#import "ImageButton.h"

@implementation ImageButton
@synthesize smallImg,titleLab;
-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.smallImg = [[UIImageView alloc]initWithFrame:CGRectZero];
        self.backgroundColor = [UIColor clearColor];
        [self addSubview:self.smallImg];
        
        self.titleLab = [[UILabel alloc]initWithFrame:CGRectMake(frame.size.width /2, (frame.size.height - 17)/2, frame.size.width/2, 17)];
        self.titleLab.backgroundColor = [UIColor clearColor];
        self.titleLab.font = [UIFont systemFontOfSize:12];
        self.titleLab.textColor = [UIColor blackColor];
        [self addSubview:self.titleLab];
    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
